    <table width="100%" border="0" cellspacing="0" cellpadding="0" class="metallic_grid_top_table" >
        <tr>
            <td>
                <div class="metallic_grid_title">Files</div>
            </td>
        </tr>
        <tr>
            <td class="metallic_paginator">
                <form action="admin/modules/tangra_cms/attachment/attachments.php" method="get">
                <table border="0" cellspacing="0" cellpadding="4">
                    <tr>
                        <td valign="middle"><strong>Filter</strong>&nbsp;&nbsp;&nbsp;
                        </td>
                        <td>
                            <table border="0" cellspacing="0" cellpadding="4" align="left">
                                <tr>
                                    <td>File name like:</td>
                                    <td><input name="filename" type="text" size="45" maxlength="255" value="{$filename}"/>&nbsp;&nbsp;</td>
                                </tr>
                                <tr>
                                    <td>Note like:</td>
                                    <td><input name="note" type="text" size="45" maxlength="255" value="{$note}"/>&nbsp;&nbsp;</td>                                    
                                </tr>
                            </table>                        
                        </td>
                        <td valign="middle"><input name="submit_filter" type="submit" value="filter" /></td>
                    </tr>
                </table>
                <input type="hidden" name="ci" value="{$ci_id}" />
                </form>
            </td>
        </tr>              
        
        <tr>
            <td>
                <table width="100%" border="0" cellspacing="0" cellpadding="0" class="metallic_paginator">
                    <tr>
                        <td width="34%"> {if $attachments_total_pages > 1}
                            <table border="0" cellspacing="0" cellpadding="2" class="metallic_pg_page_of_table">
                                <tr>
                                    <td valign="middle">{if $attachments_first_page}<a href="{$attachments_first_page}" onclick="submit_ajax_grid_attachments({$attachments_first_page_num}); return false;"><img src="img/modules/grid_html_tpl_static_ajax_metallic/page_first_blue.png" alt="First page" border="0" /></a>{else}<img src="img/modules/grid_html_tpl_static_ajax_metallic/page_first.png" alt="First page" border="0" />{/if}</td>
                                    <td valign="middle">{if $attachments_prev_page}<a href="{$attachments_prev_page}" onclick="submit_ajax_grid_attachments({$attachments_prev_page_num}); return false;"><img src="img/modules/grid_html_tpl_static_ajax_metallic/page_prev_blue.png" alt="Previous page" border="0" /></a>{else}<img src="img/modules/grid_html_tpl_static_ajax_metallic/page_prev.png" alt="Previous page" border="0" />{/if}</td>
                                    <td class="metallic_pg_page_of" valign="middle">{if $attachments_total_pages}Page {$attachments_current_page} of {$attachments_total_pages}{/if}</td>
                                    <td valign="middle">{if $attachments_next_page}<a href="{$attachments_next_page}" onclick="submit_ajax_grid_attachments({$attachments_next_page_num}); return false;"><img src="img/modules/grid_html_tpl_static_ajax_metallic/page_next_blue.png" alt="Next page" border="0" /></a>{else}<img src="img/modules/grid_html_tpl_static_ajax_metallic/page_next.png" alt="Next page" border="0" />{/if}</td>
                                    <td valign="middle">{if $attachments_last_page}<a href="{$attachments_last_page}" onclick="submit_ajax_grid_attachments({$attachments_last_page_num}); return false;"><img src="img/modules/grid_html_tpl_static_ajax_metallic/page_last_blue.png" alt="Last page" border="0" /></a>{else}<img src="img/modules/grid_html_tpl_static_ajax_metallic/page_last.png" alt="Last page" border="0" />{/if}</td>
                                </tr>
                            </table>
                            {/if} </td>
                        <td class="metallic_pg_jump_to_page" width="33%" align="center">{if $attachments_records_to} Records {$attachments_records_from}-{$attachments_records_to} of {$attachments_records_total}{/if}</td>
                        <td class="metallic_pg_records" width="33%" align="right"> {if $attachments_total_pages > 1}
                            <table border="0" cellspacing="2" cellpadding="0">
                                <tr>
                                    <td>Jump to page</td>
                                    <td>
                                        <form class="metallic_pg_page_select" action="{$attachments_jump_to_page_action}" method="get" enctype="application/x-www-form-urlencoded">
                                            <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                                <tr>
                                                    <td>
                                                        <select name="attachments_grid_page" id="attachments_field_page" onchange="attachments_page_change(this.options[this.selectedIndex].value); return false;">
                                                            
															{foreach from=$attachments_jump_to_page_arr item=attachments_page_num}
															
                                                            <option value="{$attachments_page_num}"{if $attachments_page_num == $attachments_current_page} selected="selected"{/if}>{$attachments_page_num}</option>
                                                            
															{/foreach}
														
                                                        </select>
                                                    </td>
                                                    <td>
                                                        <noscript>
                                                        &nbsp;
                                                        <input name="submit" type="image" src="img/modules/grid_html_tpl_static_ajax_metallic/page_go.png" alt="go" />
                                                        </noscript>
                                                    </td>
                                                </tr>
                                            </table>
                                        </form>
                                    </td>
                                </tr>
                            </table>
                            {else}
                            &nbsp;
                            {/if} </td>
                    </tr>
                </table>
            </td>
        </tr>
        <tr>
            <td>
                <table width="100%"  border="0" cellspacing="1" cellpadding="2" class="metallic_grid_table">
                    <thead>
                        <tr>
                        <th align="center" class="metallic_grid_header" nowrap="nowrap" width="40">&nbsp;ID&nbsp;</th>
                        <th align="left" class="metallic_grid_header" nowrap="nowrap" width="40%">&nbsp;Original filename&nbsp;</th>
                        <th align="right" class="metallic_grid_header" nowrap="nowrap" width="10%">&nbsp;Size&nbsp;</th>
                        <th align="left" class="metallic_grid_header" nowrap="nowrap" width="50%">&nbsp;Note&nbsp;</th>
                        <th class="metallic_grid_header">&nbsp;</th>
                        </tr>
                    </thead>
                    <tbody>
                    
                    {foreach from=$attachments_prows item=row}
                    <tr class="metallic_grid_body" onmouseover="this.className='metallic_grid_body_over';return true;" onmouseout="this.className='metallic_grid_body';return true;">
                        <td align="center">{if $row.cols.0 != NULL}{$row.cols.0}{else}&nbsp;{/if}</td>
                        <td align="left">{if $row.cols.1 != NULL}{$row.cols.1}{else}&nbsp;{/if}</td>
                        <td align="right">{if $row.cols.2}{$row.cols.2/1024|string_format:"%.2f"} KiB{else}&nbsp;{/if}</td>
                        <td align="left">
                            <table width="100%" border="0" cellpadding="0" cellspacing="0">
                                <tr>
                                    <td width="16"><a href="admin/modules/tangra_cms/attachment/attachment_edit.php?attachment_obj_id={$row.lc_vals.edit}" {popup text="Edit note"}><img src="/img/modules/crystal_icons_small/16x16/edit.png" alt="Edit" width="16" height="16" border="0" /></a></td>
                                    <td align="left">&nbsp;{if $row.cols.3}{$row.cols.3|truncate}{else}<span class="no_value">-- N/A --</span>{/if}</td>
                                </tr>
                            </table>
                        </td>
                        <td align="center" class="metallic_grid_link">
                            <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                <tr>
                                    <td width="16"><a href="admin/modules/tangra_cms/attachment/attachment_del.php?del={$row.lc_vals.delete}"><img src="/img/modules/crystal_icons_small/16x16/delete.png" alt="delete" width="16" height="16" border="0"/></a></td>
                                    <td style="white-space:nowrap">&nbsp;<a href="admin/modules/tangra_cms/attachment/attachment_del.php?del={$row.lc_vals.delete}">Delete file</a></td>
                                </tr>
                            </table>
                        </td>
                    </tr>
                    {foreachelse}
                    <tr class="metallic_grid_body">
                        <td colspan="4" align="left">No items</td>
                        <td>&nbsp;</td>
                    </tr>
                    {assign var="$attachments_prows_count"  value=1}
                    {/foreach}
				{math equation="$attachments_page_size - rc" rc=$attachments_prows_count assign=rc}
				{section name=aa loop=$rc}
				<tr class="metallic_grid_body">
                    <td colspan="4">&nbsp;</td>
										<td>&nbsp;</td>
									</tr>
				{/section}
                    </tbody>
                    
                </table>
            </td>
        </tr>
        <tr>
            <td>
                <table width="100%" border="0" cellspacing="0" cellpadding="0" class="metallic_paginator">
                    <tr>
                        <td width="34%"> {if $attachments_total_pages > 1}
                            <table border="0" cellspacing="0" cellpadding="2" class="metallic_pg_page_of_table">
                                <tr>
                                    <td valign="middle">{if $attachments_first_page}<a href="{$attachments_first_page}" onclick="submit_ajax_grid_attachments({$attachments_first_page_num}); return false;"><img src="img/modules/grid_html_tpl_static_ajax_metallic/page_first_blue.png" alt="First page" border="0" /></a>{else}<img src="img/modules/grid_html_tpl_static_ajax_metallic/page_first.png" alt="First page" border="0" />{/if}</td>
                                    <td valign="middle">{if $attachments_prev_page}<a href="{$attachments_prev_page}" onclick="submit_ajax_grid_attachments({$attachments_prev_page_num}); return false;"><img src="img/modules/grid_html_tpl_static_ajax_metallic/page_prev_blue.png" alt="Previous page" border="0" /></a>{else}<img src="img/modules/grid_html_tpl_static_ajax_metallic/page_prev.png" alt="Previous page" border="0" />{/if}</td>
                                    <td class="metallic_pg_page_of" valign="middle">{if $attachments_total_pages}Page {$attachments_current_page} of {$attachments_total_pages}{/if}</td>
                                    <td valign="middle">{if $attachments_next_page}<a href="{$attachments_next_page}" onclick="submit_ajax_grid_attachments({$attachments_next_page_num}); return false;"><img src="img/modules/grid_html_tpl_static_ajax_metallic/page_next_blue.png" alt="Next page" border="0" /></a>{else}<img src="img/modules/grid_html_tpl_static_ajax_metallic/page_next.png" alt="Next page" border="0" />{/if}</td>
                                    <td valign="middle">{if $attachments_last_page}<a href="{$attachments_last_page}" onclick="submit_ajax_grid_attachments({$attachments_last_page_num}); return false;"><img src="img/modules/grid_html_tpl_static_ajax_metallic/page_last_blue.png" alt="Last page" border="0" /></a>{else}<img src="img/modules/grid_html_tpl_static_ajax_metallic/page_last.png" alt="Last page" border="0" />{/if}</td>
                                </tr>
                            </table>
                            {/if} </td>
                        <td class="metallic_pg_jump_to_page" width="33%" align="center">{if $attachments_records_to} Records {$attachments_records_from}-{$attachments_records_to} of {$attachments_records_total}{/if}</td>
                        <td class="metallic_pg_records" width="33%" align="right"> {if $attachments_total_pages > 1}
                            <table border="0" cellspacing="2" cellpadding="0">
                                <tr>
                                    <td>Jump to page</td>
                                    <td>
                                        <form action="{$attachments_jump_to_page_action}" method="get" enctype="application/x-www-form-urlencoded">
                                            <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                                <tr>
                                                    <td>
                                                        <select name="attachments_grid_page" id="attachments_field_page" onchange="attachments_page_change(this.options[this.selectedIndex].value); return false;">
                                                            
															{foreach from=$attachments_jump_to_page_arr item=attachments_page_num}
															
                                                            <option value="{$attachments_page_num}"{if $attachments_page_num == $attachments_current_page} selected="selected"{/if}>{$attachments_page_num}</option>
                                                            
															{/foreach}
														
                                                        </select>
                                                    </td>
                                                    <td>
                                                        <noscript>
                                                        &nbsp;
                                                        <input name="submit" type="image" src="img/modules/grid_html_tpl_static_ajax_metallic/page_go.png" alt="go" />
                                                        </noscript>
                                                    </td>
                                                </tr>
                                            </table>
                                        </form>
                                    </td>
                                </tr>
                            </table>
                            {else}
                            &nbsp;
                            {/if} </td>
                    </tr>
                </table>
            </td>
        </tr>
    </table>
